package com.elin4it.blog.service;

import com.elin4it.blog.mapper.ArticleTypeMapper;
import com.elin4it.blog.pojo.ArticleType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * User:Elin
 * Date:2015/7/19
 * Description:
 */
@Service
public class ArticleTypeServiceImpl implements ArticleTypeService {

    @Autowired
    private ArticleTypeMapper articleTypeMapper;

    public List<ArticleType> findArticleTypeList() throws Exception {
        //查找所有类型
        List<ArticleType> list = articleTypeMapper.selectByExample(null);

        return list;
    }

    public int findArticleTypeCount() throws Exception {
        int count = articleTypeMapper.countByExample(null);
        return count;
    }
}
